#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright @ 2014 OPS, Qunar Inc. (qunar.com)
#
# Author: tingfang.bao <tingfang.bao@qunar.com>
# DateTime: 15-3-10 下午2:09
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.serving import run_simple

from app import app as frontend
from app1 import app as backend

application = DispatcherMiddleware(frontend, {
    '/backend': backend
})

if __name__ == '__main__':
    run_simple('0.0.0.0', 8080, application, use_reloader=True, use_debugger=True, use_evalex=True)
    # 启动之后，可以分别访问http://127.0.0.1:8080/和http://127.0.0.1:8080/backend

